<template>
  <div>
    <h1>
      <el-icon :size="20">
        <edit />
      </el-icon>测试页面
    </h1>
    <el-button @click="backHome">返回首页</el-button>
    <el-button>test-element</el-button>
    <h3>LOGIN</h3>
    <el-button @click="login">Login</el-button>
    <el-button @click="getMenus">getMenus</el-button>
  </div>
</template>

<script setup lang="ts">
import { reqLogin, reqMenus } from '@/api/common'
import router from '@/router'
const login = async () => {
  const result = await reqLogin({ username: 'admin', password: '123456' })
  console.log(result)
}
const getMenus = async () => {
  const result = await reqMenus()
  console.log(result)
}

const backHome = () => {
  router.push('/')
}
</script>

<style scoped>
</style>
